package com.example.list;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Iterator;

/**
 * @author houyangfan
 * @version 1.0
 * @date 2022/9/26 16:16
 */
public class App {

    public static void main( String[] args )
    {

        /*ArrayListTest.addFromHeaderTest(100000);
        LinkedListTest.addFromHeaderTest(100000);

        ArrayListTest.addFromMidTest(10000);
        LinkedListTest.addFromMidTest(10000);

        ArrayListTest.addFromTailTest(1000000);
        LinkedListTest.addFromTailTest(1000000);

        ArrayListTest.deleteFromHeaderTest(100000);
        LinkedListTest.deleteFromHeaderTest(100000);

        ArrayListTest.deleteFromMidTest(100000);
        LinkedListTest.deleteFromMidTest(100000);

        ArrayListTest.deleteFromTailTest(1000000);
        LinkedListTest.deleteFromTailTest(1000000);

        ArrayListTest.getByForTest(10000);
        LinkedListTest.getByForTest(10000);

        ArrayListTest.getByIteratorTest(100000);
        LinkedListTest.getByIteratorTest(100000);*/

        BigDecimal bigDecimal = new BigDecimal("1000.00");
        System.out.println(new BigDecimal(bigDecimal.stripTrailingZeros().toPlainString()));
        BigDecimal bigDecimal3 = new BigDecimal("12.00");
        BigDecimal bigDecimal4 = new BigDecimal("1200.00");
        BigDecimal result2 = bigDecimal4.divide(bigDecimal3, 4, BigDecimal.ROUND_HALF_UP);
        System.out.println(result2); // 100.0000
        System.out.println(result2.stripTrailingZeros()); // 1E+2
        System.out.println(result2.stripTrailingZeros().toPlainString()); //
    }

}
